<div class="container">
    <div class="d1">Hello1</div><div class="d2">Hello2</div>
</div>
<style>
    .container > div {
        display: inline-block;
        width: 100px;
        height: 100px;
    }
    .d1 {
        background-color: pink;
        position: relative;
        left: 10px;
        top: 10px;
        /*z-index: -1;*/
    }
    .d2 {
        position: relative;
        background: skyblue;
        z-index: 1;
    }
</style>